<template>
	<view class="order">
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
		<view class="" v-if="this.current==0">
			<view class="title">
				<view class="date">
					{{this.date}}
				</view>
				<view class="calendar" @click="show = true">
					<image src="../../static/calendar.png" mode=""></image>
				</view>
				<u-picker v-model="show" mode="time" :params="params" @confirm="confirm"></u-picker>
			</view>
			<view class="no">
				<image src="../../static/img/no.png" mode=""></image>
				<view class="xiaoxi">
					暂无消息通知~
				</view>
			</view>
		</view>
		<view class="" v-if="this.current==1">
			<view class="title">
				<view class="date">
					{{this.date}}
				</view>
				<view class="calendar" @click="show = true">
					<image src="../../static/calendar.png" mode=""></image>
				</view>
				<u-picker v-model="show" mode="time" :params="params" @confirm="confirm"></u-picker>
			</view>
			<view class="no">
				<image src="../../static/img/no.png" mode=""></image>
				<view class="xiaoxi">
					暂无消息通知~
				</view>
			</view>
		</view>
		<view class="" v-if="this.current==2">
			<view class="title">
				<view class="date">
					{{this.date}}
				</view>
				<view class="calendar" @click="show = true">
					<image src="../../static/calendar.png" mode=""></image>
				</view>
				<u-picker v-model="show" mode="time" :params="params" @confirm="confirm"></u-picker>
			</view>
			<view class="no">
				<image src="../../static/img/no.png" mode=""></image>
				<view class="xiaoxi">
					暂无消息通知~
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "inform",
		data() {
			return {
				list: [{
					name: '全部'
				}, {
					name: '进行中'
				}, {
					name: '完成单'
				}],
				current: 0,
				show: false,
				params: {
					year: true,
					month: true,
					day: false,
					hour: false,
					minute: false,
					second: false
				},
				date:'2021年7月',
			};
		},
		methods: {
			change(index) {
				this.current = index;
			},
			confirm(val) {
				// console.log(val);
				this.date=val.year+'年'+val.month+'月'
			},
		}
	}
</script>

<style scoped>
	.order{
		background-color: rgb(255,255,255);
		height: 1250rpx;
	}
	.title {
		background: rgb(238, 238, 238);
		width: 100%;
		height: 90rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 18rpx;
		padding-top: 28rpx;
	}

	.calendar image {
		width: 40rpx;
		height: 40rpx;
	}
	.no{
		display: flex;
		flex-direction: column;
		align-content: center;
		align-items: center;
		padding-top: 50%;
	}
	.no image{
		width: 220rpx;
		height: 200rpx;
	}
	.no view{
		color: rgb(153,153,153);
		padding-top: 30rpx;
	}
</style>
